#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    int maxPower(string s)
    {
        int ret = 0;
        int f[s.size()] = {1};
        for (int i = 1; i < s.size(); ++i)
        {
            if (s[i - 1] == s[i])
            {
                f[i] = f[i - 1] + 1;
            }
            else
            {
                f[i] = 1;
            }
            ret = max(ret, f[i]);
        }
        return ret;
    }
};